/**
 * Sidebar navigation
 */

.main-nav {
  float: none!important;
  > li {
    display: block;
    width: 100%;
    position: relative;
    > a {
      color: $link-base-color;
      @media (min-width: $screen-sm-min) {
        padding: 10px 20px;
      }
    }
  }
  > .active {
    a,
    a:hover,
    a:focus {
      color: $link-dark-color;
      background: #f4f4f4;
    }
  }
}


/**
 * profile-block
 */

.profile-block {
  padding: 40px 20px 20px;
}

#avatar {
  width: 80px;
  height: 80px;
  display: inline-block;
  img {
    width: 100%;
    max-height: 100%;
    height: auto!important;
  }
}

#name {
  font-size: 20px;
  margin-bottom: 0;
}

#title {
  font-size: 14px;
  margin-top: 5px;
  margin-bottom: 5px;
}


/**
 * search
 */

.sidebar-form {
  border-radius: 3px;
  border: 1px solid #eee;
  margin: 0 10px 20px 10px;
  input[type="text"],
  .btn {
    box-shadow: none;
    background-color: transparent;
    border: 1px solid transparent;
    height: 35px;
    &:focus {
      outline: none;
    }
  }
  input[type="text"] {
    color: #666;
    border-top-left-radius: 2px;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    border-bottom-left-radius: 2px;
    &:focus,
    &:focus+.input-group-btn .btn {
      background-color: #fff;
      color: #666
    }
  }
  .btn {
    color: #999;
    border-top-left-radius: 0;
    border-top-right-radius: 2px;
    border-bottom-right-radius: 2px;
    border-bottom-left-radius: 0
  }
  @media (max-width: $screen-xs-max) {
    border: 0;
    margin: 9px 40px 9px 0;
    .input-group-btn .btn {
      color: $brand-primary;
    }
    input[type="text"] {
      &:focus {
        background-color: transparent;
        &+.input-group-btn .btn {
          color: $brand-success;
          background-color: transparent;
        }
      }
    }
  }
  @media (min-width: $screen-sm-min) and (max-width: $screen-sm-max) {
    display: none;
  }
}

.header {
  /**
 * navbar
 */
  .navbar-collapse {
    padding-left: 0;
    padding-right: 0;
    .navbar-nav {
      margin: 0;
    }
  }
  .navbar-toggle {
    .icon-bar {
      background-color: $brand-primary;
    }
  }
  @media (max-width: $screen-xs-max) {
    .navbar-toggle {
      position: absolute;
      top: 0;
      right: 0;
      margin-right: 5px;
      .icon-bar {
        width: 18px;
      }
    }
    .search {
      width: 91.66667%;
      float: left;
    }
    .profile-block {
      padding: 0;
      margin: 10px 0;
      width: 8.33333%;
      float: left;
    }
    #avatar {
      width: 32px;
      height: 32px;
    }
    #name,
    #title,
    #location {
      display: none;
    }
  }
  @media (min-width: $screen-sm-min) and (max-width: $screen-sm-max) {
    .main-nav > li > a {
      text-align: center;
      padding-left: 0;
      padding-right: 0;
      span {
        display: none;
      }
    }
    .profile-block {
      padding-left: 0;
      padding-right: 0;
    }
    #avatar {
      width: 32px;
      height: 32px;
    }
  }
  @media (min-width: $screen-xl-min) {
    #title {
      font-size: 16px;
    }
  }
}

#main-navbar {
  @media (max-width: $screen-xs-max) {
    position: absolute;
    width: 100%;
    background-color: $mainside-bg;
    // border-top: 1px solid $sidebar-border-color;
    border-bottom: 1px solid $sidebar-border-color;
    z-index: 99;
  }
}
